-
Notifications
You must be signed in to change notification settings - Fork 293
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Proposal: Isomorphic pythonVariableRequester and debuggerVariables.ts #10142
Proposal: Isomorphic pythonVariableRequester and debuggerVariables.ts #10142
Conversation
Codecov Report
@@ Coverage Diff @@
## main #10142 +/- ##
======================================
+ Coverage 55% 61% +5%
======================================
Files 203 203
Lines 9238 9237 -1
Branches 1490 1490
======================================
+ Hits 5099 5636 +537
+ Misses 3737 3126 -611
- Partials 402 475 +73
|
src/webviews/extension-side/dataviewer/jupyterVariableDataProvider.ts
Outdated
Show resolved
Hide resolved
@@ -116,7 +119,7 @@ export class DebuggerVariables | |||
if (this.active) { | |||
// Note, full variable results isn't necessary for this call. It only really needs the variable value. | |||
const result = this.lastKnownVariables.find((v) => v.name === name); | |||
if (result && kernel?.resourceUri?.fsPath.endsWith('.ipynb')) { | |||
if (result && kernel?.resourceUri?.path.endsWith('.ipynb')) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was part of the existing code already and I don't think that it's much of an issue. But since we have the vscode-path path already I think that path.extname is a safer way to get this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like that! Thank you!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Aside from that review looks good. Nice work! Approving and you can check out if extpath works here or not.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approving with one possible area to checkout.
This PR is a continuation of #10092
In this PR, rather than making the
constants.node.ts
work with URIs, I'm removing any reference to the root in that file and moving those references to the node file, and I'm also using these on thepythonVariableRequester
to make non-node-specific.How far from the goalpost am I in this PR?
Any feedback appreciated.
If this approach is ok, this might be my last PR before the web variable viewer.
Update: Thanks to the feedback provided now I have also made debuggerVariables isomorphic!